<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pymunk.Space</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pymunk-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://pymunk.googlecode.com/">pymunk API reference</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pymunk-module.html">Package&nbsp;pymunk</a> ::
        Class&nbsp;Space
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pymunk.Space-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Space</h1><p class="nomargin-top"></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Space</strong>
</pre>

<hr />
Spaces are the basic unit of simulation. You add rigid bodies, shapes
and joints to it and then step them all forward together through time.

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Instance Methods</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">iterations</span>=<span class="summary-sig-default">10</span>)</span><br />
      Create a new instace of the Space</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__del__"></a><span class="summary-sig-name">__del__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="add"></a><span class="summary-sig-name">add</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*objs</span>)</span><br />
      Add one or many shapes, bodies or joints to the space</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="add_static"></a><span class="summary-sig-name">add_static</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*objs</span>)</span><br />
      Add one or many static shapes to the space</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#remove" class="summary-sig-name">remove</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*objs</span>)</span><br />
      Remove one or many shapes, bodies or constraints from the space</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="remove_static"></a><span class="summary-sig-name">remove_static</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">*objs</span>)</span><br />
      Remove one or many static shapes from the space</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#resize_static_hash" class="summary-sig-name">resize_static_hash</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dim</span>=<span class="summary-sig-default">100.0</span>,
        <span class="summary-sig-arg">count</span>=<span class="summary-sig-default">1000</span>)</span><br />
      The spatial hashes used by pymunk's collision detection are fairly
size sensitive. dim is the size of the hash cells. Setting dim to the
average objects size is likely to give the best performance.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#resize_active_hash" class="summary-sig-name">resize_active_hash</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dim</span>=<span class="summary-sig-default">100.0</span>,
        <span class="summary-sig-arg">count</span>=<span class="summary-sig-default">1000</span>)</span><br />
      The spatial hashes used by pymunk's collision detection are fairly
size sensitive. dim is the size of the hash cells. Setting dim to the
average objects size is likely to give the best performance.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="reindex_static"></a><span class="summary-sig-name">reindex_static</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Update the collision detection info for the static shapes in the
space. You only need to call this if you move one of the static shapes.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="reindex_shape"></a><span class="summary-sig-name">reindex_shape</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">shape</span>)</span><br />
      Update the collision detection data for a specific shape in the
space.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="step"></a><span class="summary-sig-name">step</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dt</span>)</span><br />
      Update the space for the given time step. Using a fixed time step is
highly recommended. Doing so will increase the efficiency of the
contact persistence, requiring an order of magnitude fewer iterations
to resolve the collisions in the usual case.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#add_collision_handler" class="summary-sig-name">add_collision_handler</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">a</span>,
        <span class="summary-sig-arg">b</span>,
        <span class="summary-sig-arg">begin</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">pre_solve</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">post_solve</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">separate</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      Add a collision handler for given collision type pair.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#set_default_collision_handler" class="summary-sig-name">set_default_collision_handler</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">begin</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">pre_solve</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">post_solve</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">separate</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      Register a default collision handler to be used when no specific
collision handler is found. If you do nothing, the space will be given
a default handler that accepts all collisions in begin() and
pre_solve() and does nothing for the post_solve() and separate()
callbacks.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#remove_collision_handler" class="summary-sig-name">remove_collision_handler</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">a</span>,
        <span class="summary-sig-arg">b</span>)</span><br />
      Remove a collision handler for a given collision type pair.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#add_post_step_callback" class="summary-sig-name">add_post_step_callback</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">callback_function</span>,
        <span class="summary-sig-arg">obj</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      Add a function to be called last in the next simulation step.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#point_query" class="summary-sig-name">point_query</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">point</span>,
        <span class="summary-sig-arg">layers</span>=<span class="summary-sig-default">-1</span>,
        <span class="summary-sig-arg">group</span>=<span class="summary-sig-default">0</span>)</span><br />
      Query space at point filtering out matches with the given layers
and group. Return a list of found shapes.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#point_query_first" class="summary-sig-name">point_query_first</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">point</span>,
        <span class="summary-sig-arg">layers</span>=<span class="summary-sig-default">-1</span>,
        <span class="summary-sig-arg">group</span>=<span class="summary-sig-default">0</span>)</span><br />
      Query space at point and return the first shape found matching the
given layers and group. Returns None if no shape was found.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#segment_query" class="summary-sig-name">segment_query</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">start</span>,
        <span class="summary-sig-arg">end</span>,
        <span class="summary-sig-arg">layers</span>=<span class="summary-sig-default">-1</span>,
        <span class="summary-sig-arg">group</span>=<span class="summary-sig-default">0</span>)</span><br />
      Query space along the line segment from start to end filtering out
matches with the given layers and group.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="segment_query_first"></a><span class="summary-sig-name">segment_query_first</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">start</span>,
        <span class="summary-sig-arg">end</span>,
        <span class="summary-sig-arg">layers</span>=<span class="summary-sig-default">-1</span>,
        <span class="summary-sig-arg">group</span>=<span class="summary-sig-default">0</span>)</span><br />
      Query space along the line segment from start to end filtering out
matches with the given layers and group. Only the first shape
encountered is returned and the search is short circuited.
Returns None if no shape was found.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#bb_query" class="summary-sig-name">bb_query</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">bb</span>,
        <span class="summary-sig-arg">layers</span>=<span class="summary-sig-default">-1</span>,
        <span class="summary-sig-arg">group</span>=<span class="summary-sig-default">0</span>)</span><br />
      Perform a fast rectangle query on the space.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Space-class.html#shape_query" class="summary-sig-name">shape_query</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">shape</span>)</span><br />
      Query a space for any shapes overlapping the given shape</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Properties</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#shapes" class="summary-name">shapes</a><br />
      A list of the shapes added to this space
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#static_shapes" class="summary-name">static_shapes</a><br />
      A list of the static shapes added to this space
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#bodies" class="summary-name">bodies</a><br />
      A list of the bodies added to this space
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#constraints" class="summary-name">constraints</a><br />
      A list of the constraints added to this space
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#static_body" class="summary-name">static_body</a><br />
      A convenience static body already added to the space
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#iterations" class="summary-name">iterations</a><br />
      Number of iterations to use in the impulse solver to solve
contacts.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#gravity" class="summary-name">gravity</a><br />
      Default gravity to supply when integrating rigid body motions.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#damping" class="summary-name">damping</a><br />
      Damping rate expressed as the fraction of velocity bodies
retain each second.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#idle_speed_threshold" class="summary-name">idle_speed_threshold</a><br />
      Speed threshold for a body to be considered idle.
The default value of 0 means to let the space guess a good threshold
based on gravity.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#sleep_time_threshold" class="summary-name">sleep_time_threshold</a><br />
      Time a group of bodies must remain idle in order to fall
asleep.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#collision_slop" class="summary-name">collision_slop</a><br />
      Amount of allowed penetration.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#collision_bias" class="summary-name">collision_bias</a><br />
      Determines how fast overlapping shapes are pushed apart.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#collision_persistence" class="summary-name">collision_persistence</a><br />
      Number of frames that contact information should persist.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Space-class.html#enable_contact_graph" class="summary-name">enable_contact_graph</a><br />
      Rebuild the contact graph during each step.
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">iterations</span>=<span class="sig-default">10</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Create a new instace of the Space</p>
<p>Its usually best to keep the elastic_iterations setting to 0. Only
change if you have problem with stacking elastic objects on each other.
If that is the case, try to raise it. However, a value other than 0
will affect other parts, most importantly you wont get reliable
total_impulse readings from the <a href="pymunk.Arbiter-class.html" class="link">Arbiter</a> object in collsion callbacks!</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>iterations</code></strong> (int) - Number of iterations to use in the impulse solver to solve
contacts.</li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="remove"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">remove</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">*objs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Remove one or many shapes, bodies or constraints from the space</p>
<p><em>Note</em> When removing objects from the space, make sure you remove any
other objects that reference it. For instance, when you remove a body,
remove the joints and shapes attached to it.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="resize_static_hash"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">resize_static_hash</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dim</span>=<span class="sig-default">100.0</span>,
        <span class="sig-arg">count</span>=<span class="sig-default">1000</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>The spatial hashes used by pymunk's collision detection are fairly
size sensitive. dim is the size of the hash cells. Setting dim to the
average objects size is likely to give the best performance.</p>
<p>count is the suggested minimum number of cells in the hash table.
Bigger is better, but only to a point. Setting count to ~10x the number
of objects in the hash is probably a good starting point.</p>
<p>Because static shapes are only rehashed when you request it, it's
possible to use a much higher count argument to resize_static_hash()
than to resize_active_hash(). Doing so will use more memory though.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="resize_active_hash"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">resize_active_hash</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dim</span>=<span class="sig-default">100.0</span>,
        <span class="sig-arg">count</span>=<span class="sig-default">1000</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>The spatial hashes used by pymunk's collision detection are fairly
size sensitive. dim is the size of the hash cells. Setting dim to the
average objects size is likely to give the best performance.</p>
<p>count is the suggested minimum number of cells in the hash table.
Bigger is better, but only to a point. Setting count to ~10x the number
of objects in the hash is probably a good starting point.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="add_collision_handler"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_collision_handler</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">a</span>,
        <span class="sig-arg">b</span>,
        <span class="sig-arg">begin</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">pre_solve</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">post_solve</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">separate</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwargs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Add a collision handler for given collision type pair.</p>
<p>Whenever a shapes with collision_type a and collision_type b collide,
these callbacks will be used to process the collision.
None can be provided for callbacks you do not wish to implement,
however pymunk will call it's own default versions for these and not
the default ones you've set up for the Space. If you need to fall back
on the space's default callbacks, you'll have to provide them
individually to each handler definition.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>a</code></strong> (int) - Collision type of the first shape</li>
        <li><strong class="pname"><code>b</code></strong> (int) - Collision type of the second shape</li>
        <li><strong class="pname"><code>begin</code></strong> (<tt class="rst-docutils literal">func(space, arbiter, *args, **kwargs) <span class="pre">-&gt;</span> bool</tt>) - Collision handler called when two shapes just started touching
for the first time this step. Return false from the callback
to make pymunk ignore the collision or true to process it
normally. Rejecting a collision from a begin() callback
permanently rejects the collision until separation. Pass
<code class="link">None</code> if you wish to use the pymunk default.</li>
        <li><strong class="pname"><code>pre_solve</code></strong> (<tt class="rst-docutils literal">func(space, arbiter, *args, **kwargs) <span class="pre">-&gt;</span> bool</tt>) - Collision handler called when two shapes are touching. Return
false from the callback to make pymunk ignore the collision or
true to process it normally. Additionally, you may override
collision values such as <a href="pymunk.Arbiter-class.html#elasticity" class="link">Arbiter.elasticity</a> and
<a href="pymunk.Arbiter-class.html#friction" class="link">Arbiter.friction</a> to provide custom friction or elasticity
values. See <a href="pymunk.Arbiter-class.html" class="link">Arbiter</a> for more info. Pass <code class="link">None</code> if you wish
to use the pymunk default.</li>
        <li><strong class="pname"><code>post_solve</code></strong> (<tt class="rst-docutils literal">func(space, arbiter, *args, **kwargs)</tt>) - Collsion handler called when two shapes are touching and their
collision response has been processed. You can retrieve the
collision force at this time if you want to use it to
calculate sound volumes or damage amounts. Pass <code class="link">None</code> if you
wish to use the pymunk default.</li>
        <li><strong class="pname"><code>separate</code></strong> (<tt class="rst-docutils literal">func(space, arbiter, *args, **kwargs)</tt>) - Collision handler called when two shapes have just stopped
touching for the first time this frame. Pass <code class="link">None</code> if you
wish to use the pymunk default.</li>
        <li><strong class="pname"><code>args</code></strong> - Optional parameters passed to the collision handler functions.</li>
        <li><strong class="pname"><code>kwargs</code></strong> - Optional keyword parameters passed on to the collision handler
functions.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="set_default_collision_handler"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_default_collision_handler</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">begin</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">pre_solve</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">post_solve</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">separate</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwargs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  Register a default collision handler to be used when no specific
collision handler is found. If you do nothing, the space will be given
a default handler that accepts all collisions in begin() and
pre_solve() and does nothing for the post_solve() and separate()
callbacks.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>begin</code></strong> (<tt class="rst-docutils literal">func(space, arbiter, *args, **kwargs) <span class="pre">-&gt;</span> bool</tt>) - Collision handler called when two shapes just started touching
for the first time this step. Return False from the callback
to make pymunk ignore the collision or True to process it
normally. Rejecting a collision from a begin() callback
permanently rejects the collision until separation. Pass
<code class="link">None</code> if you wish to use the pymunk default.</li>
        <li><strong class="pname"><code>pre_solve</code></strong> (<tt class="rst-docutils literal">func(space, arbiter, *args, **kwargs) <span class="pre">-&gt;</span> bool</tt>) - Collision handler called when two shapes are touching. Return
False from the callback to make pymunk ignore the collision or
True to process it normally. Additionally, you may override
collision values such as Arbiter.elasticity and
Arbiter.friction to provide custom friction or elasticity
values. See Arbiter for more info. Pass <code class="link">None</code> if you wish to
use the pymunk default.</li>
        <li><strong class="pname"><code>post_solve</code></strong> (<tt class="rst-docutils literal">func(space, arbiter, *args, **kwargs)</tt>) - Collsion handler called when two shapes are touching and their
collision response has been processed. You can retrieve the
collision force at this time if you want to use it to
calculate sound volumes or damage amounts. Pass <code class="link">None</code> if you
wish to use the pymunk default.</li>
        <li><strong class="pname"><code>separate</code></strong> (<tt class="rst-docutils literal">func(space, arbiter, *args, **kwargs)</tt>) - Collision handler called when two shapes have just stopped
touching for the first time this frame. Pass <code class="link">None</code> if you wish
to use the pymunk default.</li>
        <li><strong class="pname"><code>args</code></strong> - Optional parameters passed to the collision handler functions.</li>
        <li><strong class="pname"><code>kwargs</code></strong> - Optional keyword parameters passed on to the collision handler
functions.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="remove_collision_handler"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">remove_collision_handler</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">a</span>,
        <span class="sig-arg">b</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  Remove a collision handler for a given collision type pair.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>a</code></strong> (int) - Collision type of the first shape</li>
        <li><strong class="pname"><code>b</code></strong> (int) - Collision type of the second shape</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="add_post_step_callback"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_post_step_callback</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">callback_function</span>,
        <span class="sig-arg">obj</span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwargs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Add a function to be called last in the next simulation step.</p>
<p>Post step callbacks are the place where you can break the rules about
removing objects from within a callback. In fact, their primary
function is to help you safely remove objects from the space that were
destroyed or disabled during the step.</p>
<p>Post step callbacks are registered as a function and an object used as
a key. You can only register one post step callback per object. This
prevents you from removing an object more than once. For instance, say
that you get a collision callback between a bullet and object A. The
bullet and object A are destroyed, so you add a post step callback for
each to remove. In the same step, the same bullet also hit object B
and you add two more callbacks, one for object B and a second for the
bullet. This is actually just fine, and the callback to remove the
bullet will only be called once!</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>callback_function</code></strong> (<tt class="rst-docutils literal">func(obj, *args, **kwargs)</tt>) - The callback function.</li>
        <li><strong class="pname"><code>obj</code></strong> (Any object) - This object is used as a key, you can only have one callback
for a single object. It is passed on to the callback function.</li>
        <li><strong class="pname"><code>args</code></strong> - Optional parameters passed to the callback function.</li>
        <li><strong class="pname"><code>kwargs</code></strong> - Optional keyword parameters passed on to the callback function.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="point_query"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">point_query</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">point</span>,
        <span class="sig-arg">layers</span>=<span class="sig-default">-1</span>,
        <span class="sig-arg">group</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Query space at point filtering out matches with the given layers
and group. Return a list of found shapes.</p>
<p>If you don't want to filter out any matches, use -1 for the layers
and 0 as the group.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>point</code></strong> ((x,y) or <a href="pymunk.vec2d.Vec2d-class.html" class="link">Vec2d</a>) - Define where to check for collision in the space.</li>
        <li><strong class="pname"><code>layers</code></strong> (int) - Only pick shapes matching the bit mask. i.e.
(layers &amp; shape.layers) != 0</li>
        <li><strong class="pname"><code>group</code></strong> (int) - Only pick shapes in this group.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="point_query_first"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">point_query_first</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">point</span>,
        <span class="sig-arg">layers</span>=<span class="sig-default">-1</span>,
        <span class="sig-arg">group</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  Query space at point and return the first shape found matching the
given layers and group. Returns None if no shape was found.
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>point</code></strong> ((x,y) or <a href="pymunk.vec2d.Vec2d-class.html" class="link">Vec2d</a>) - Define where to check for collision in the space.</li>
        <li><strong class="pname"><code>layers</code></strong> (int) - Only pick shapes matching the bit mask. i.e.
(layers &amp; shape.layers) != 0</li>
        <li><strong class="pname"><code>group</code></strong> (int) - Only pick shapes in this group.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="segment_query"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">segment_query</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">start</span>,
        <span class="sig-arg">end</span>,
        <span class="sig-arg">layers</span>=<span class="sig-default">-1</span>,
        <span class="sig-arg">group</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Query space along the line segment from start to end filtering out
matches with the given layers and group.</p>
<p>Segment queries are like ray casting, but because pymunk uses a
spatial hash to process collisions, it cannot process infinitely
long queries like a ray. In practice this is still very fast and you
don't need to worry too much about the performance as long as you
aren't using very long segments for your queries.</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>[<a href="pymunk.SegmentQueryInfo-class.html" class="link">SegmentQueryInfo</a>] - One SegmentQueryInfo object for each hit.</dd>
  </dl>
</td></tr></table>
</div>
<a name="bb_query"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">bb_query</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">bb</span>,
        <span class="sig-arg">layers</span>=<span class="sig-default">-1</span>,
        <span class="sig-arg">group</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Perform a fast rectangle query on the space.</p>
<p>Only the shape's bounding boxes are checked for overlap, not their
full shape. Returns a list of shapes.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="shape_query"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">shape_query</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">shape</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <p>Query a space for any shapes overlapping the given shape</p>
<p>Returns a list of shapes.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== PROPERTY DETAILS ==================== -->
<a name="section-PropertyDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Property Details</span></td>
</tr>
</table>
<a name="shapes"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">shapes</h3>
  A list of the shapes added to this space
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_shapes" class="summary-sig-name" onclick="show_private();">_get_shapes</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="static_shapes"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">static_shapes</h3>
  A list of the static shapes added to this space
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_static_shapes" class="summary-sig-name" onclick="show_private();">_get_static_shapes</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="bodies"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">bodies</h3>
  A list of the bodies added to this space
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_bodies" class="summary-sig-name" onclick="show_private();">_get_bodies</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="constraints"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">constraints</h3>
  A list of the constraints added to this space
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_constraints" class="summary-sig-name" onclick="show_private();">_get_constraints</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="static_body"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">static_body</h3>
  A convenience static body already added to the space
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_static_body" class="summary-sig-name" onclick="show_private();">_get_static_body</a>(<span class="summary-sig-arg">self</span>)</span>
        - A convenience static body already added to the space
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="iterations"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">iterations</h3>
  Number of iterations to use in the impulse solver to solve
contacts.
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_iterations" class="summary-sig-name" onclick="show_private();">_get_iterations</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_set_iterations" class="summary-sig-name" onclick="show_private();">_set_iterations</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">iterations</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="gravity"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">gravity</h3>
  Default gravity to supply when integrating rigid body motions.
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_gravity" class="summary-sig-name" onclick="show_private();">_get_gravity</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_set_gravity" class="summary-sig-name" onclick="show_private();">_set_gravity</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">gravity_vec</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="damping"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">damping</h3>
  <p>Damping rate expressed as the fraction of velocity bodies
retain each second.</p>
<p>A value of 0.9 would mean that each body's velocity will drop 10% per
second. The default value is 1.0, meaning no damping is applied.</p>
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_damping" class="summary-sig-name" onclick="show_private();">_get_damping</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_set_damping" class="summary-sig-name" onclick="show_private();">_set_damping</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">damping</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="idle_speed_threshold"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">idle_speed_threshold</h3>
  Speed threshold for a body to be considered idle.
The default value of 0 means to let the space guess a good threshold
based on gravity.
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_idle_speed_threshold" class="summary-sig-name" onclick="show_private();">_get_idle_speed_threshold</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_set_idle_speed_threshold" class="summary-sig-name" onclick="show_private();">_set_idle_speed_threshold</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">idle_speed_threshold</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="sleep_time_threshold"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">sleep_time_threshold</h3>
  <p>Time a group of bodies must remain idle in order to fall
asleep.</p>
<p>Enabling sleeping also implicitly enables the the contact graph. The
default value of <a href="pymunk-module.html#inf" class="link">inf</a> disables the sleeping algorithm.</p>
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_sleep_time_threshold" class="summary-sig-name" onclick="show_private();">_get_sleep_time_threshold</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_set_sleep_time_threshold" class="summary-sig-name" onclick="show_private();">_set_sleep_time_threshold</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">sleep_time_threshold</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="collision_slop"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">collision_slop</h3>
  <p>Amount of allowed penetration.</p>
<p>Used to reduce oscillating contacts and keep the collision cache warm.
Defaults to 0.1. If you have poor simulation quality, increase this
number as much as possible without allowing visible amounts of
overlap.</p>
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_collision_slop" class="summary-sig-name" onclick="show_private();">_get_collision_slop</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_set_collision_slop" class="summary-sig-name" onclick="show_private();">_set_collision_slop</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">collision_slop</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="collision_bias"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">collision_bias</h3>
  <p>Determines how fast overlapping shapes are pushed apart.</p>
<p>Expressed as a fraction of the error remaining after each second.
Defaults to pow(1.0 - 0.1, 60.0) meaning that pymunk fixes 10% of
overlap each frame at 60Hz.</p>
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_collision_bias" class="summary-sig-name" onclick="show_private();">_get_collision_bias</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_set_collision_bias" class="summary-sig-name" onclick="show_private();">_set_collision_bias</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">collision_bias</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="collision_persistence"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">collision_persistence</h3>
  <p>Number of frames that contact information should persist.</p>
<p>Defaults to 3. There is probably never a reason to change this value.</p>
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_collision_persistence" class="summary-sig-name" onclick="show_private();">_get_collision_persistence</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_set_collision_persistence" class="summary-sig-name" onclick="show_private();">_set_collision_persistence</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">collision_persistence</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="enable_contact_graph"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">enable_contact_graph</h3>
  <p>Rebuild the contact graph during each step.</p>
<p>Must be enabled to use the cpBodyEachArbiter() function. Disabled by default for a small performance boost.</p>
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_get_enable_contact_graph" class="summary-sig-name" onclick="show_private();">_get_enable_contact_graph</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Space-class.html#_set_enable_contact_graph" class="summary-sig-name" onclick="show_private();">_set_enable_contact_graph</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">enable_contact_graph</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pymunk-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://pymunk.googlecode.com/">pymunk API reference</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Sep 04 20:04:29 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
